package com.lin.dao.user;

import com.lin.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    //获取登录的用户信息
    User getUserInfo(Connection connection, String userCode) throws SQLException;
    //修改密码
    boolean modifyPassword(Connection connection,Integer id,String userPassword) throws Exception;
    //获取用户列表
    List<User> getUserList(Connection connection, String userName, Integer userRole, Integer pageIndex, Integer pageSize) throws Exception;
    //获取用户总数
    Integer getUserCount(Connection connection,String userName,Integer userRole) throws Exception;
    //获取用户信息
    User getUserInfoById(Connection connection,Integer id) throws SQLException;
    //修改用户信息
    boolean modifyUserInfoById(Connection connection,Integer id,User user) throws Exception;
    //新增用户
    boolean addUserInfo(Connection connection,User user) throws Exception;
    //删除用户
    boolean deleteUserInfo(Connection connection,Integer id) throws Exception;
}
